<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%--
  Created by IntelliJ IDEA.
  User: 小香菜
  Date: 2023/1/10
  Time: 9:41
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>EL表达式</title>
    <style>
        th {
            font-size: 23px;
        }

        td {
            font-size: 20px;
        }
    </style>
</head>
<body>
<div>
    <c:out value="jstl标签库使用out输出" escapeXml="false"></c:out>
    <table>
        <tr>
            <th>姓名</th>
            <th>中签编号</th>
            <th>持照状态</th>
            <th>手机号码</th>
            <th>开户日期</th>
            <th>操作</th>
        </tr>
        <%-- jstl 迭代标签 --%>
        <c:forEach items="${userList}" var="u" varStatus="vs">
            <%-- 使用jstl中的forEach迭代标签库中varStatus状态属性实现隔行换色 --%>
            <tr
                    <c:if test="${vs.index % 2 == 0}">style="background-color: cyan" </c:if> >
                    <%--                    <td>count:${vs.count} | index:${vs.index}</td>--%>
                <td>${u.userName}</td>
                <td>${u.markNo}</td>
                <td <%--<c:if test="${u.status eq 0}"> style="color: red" </c:if>--%> >
                    <c:if test="${u.status eq 0}">已持照</c:if>
                    <c:if test="${u.status eq 1}">未持照</c:if>
                        <%--                        <c:choose>--%>
                        <%--                            <c:when test="${u.status eq 0}">已持照</c:when>--%>
                        <%--                            <c:otherwise>未持照</c:otherwise>--%>
                        <%--                        </c:choose>--%>
                </td>
                <td>${u.phone}</td>
                <td>${u.openDate}</td>
                <td>
                    <a href="">详情</a>&nbsp;&nbsp;&nbsp;
                    <a href="">删除</a>
                </td>
            </tr>
        </c:forEach>
    </table>
</div>
</body>
</html>
